import axios from "./index";
import {
	RegisterPayload,
	LoginPayload,
	RegisterResult,
	LoginResult,
} from "../store/actions/profile";

export function APIvalidate() {
	return axios.get("/user/validate");
}
export function APIregister(values: RegisterPayload) {
	return axios.post<RegisterResult, RegisterResult>("/user/register", values);
}
export function APIlogin(values: LoginPayload) {
	return axios.post<RegisterResult, LoginResult>("/user/login", values);
}
